package com.company.playJumpJumpWithMouse;

/**
 * Created by tangshuai on 2018/1/2.
 */
public class ScreenAdapter {


    static final int[] centers_xhdpi = new int[]{
            -13948087, -13948087, -13948087, -13948087, -13947830, -13882036, -13816755, -13816755, -13750960, -13750960,
            -13684910, -13684653, -13618603, -13553065, -13552808, -13487014, -13420964, -13420964, -13420964, -13420706,
            -13420192, -13354656, -13158303, -13158303, -13223582, -13157789, -13026973, -13026973, -13092509, -13157789,
            -13092509, -13026973, -13092510, -13158302, -13092766, -13026973, -13026973, -13026973, -13026973, -13026973,
            -13026973, -13092766, -13158303, -13158303, -13092510, -13092510, -13026973, -13092510, -13158303, -13026973,
            -13026973, -13092766, -13092510, -13026973, -13092766, -13158303, -13158303, -13092767, -13027489, -13027489,
            -13027489, -13027489, -13027489, -13027489, -13027490, -13027747, -13027749, -13027496, -13027496, -12961961,
            -12962219, -12962218, -12896682, -12830381, -12830381};


    static final int[] centers_xxhdpi = new int[]{
            -13948087, -13948087, -13948087, -13947830, -13948087, -13948087, -13948087, -13947830, -13816755, -13816755,
            -13750960, -13684910, -13618603, -13553065, -13816755, -13816755, -13750960, -13684910, -13618603, -13553065,
            -13487014, -13420964, -13420964, -13420706, -13354656, -13158303, -13487014, -13420964, -13420964, -13420706,
            -13354656, -13158303, -13223582, -13157789, -13026973, -13092509, -13092509, -13026973, -13223582, -13157789,
            -13026973, -13092509, -13092509, -13026973, -13158302, -13092766, -13026973, -13026973, -13026973, -13026973,
            -13158302, -13092766, -13026973, -13026973, -13026973, -13026973, -13158303, -13158303, -13092510, -13026973,
            -13158303, -13026973, -13158303, -13158303, -13092510, -13026973, -13158303, -13026973, -13092766, -13092510,
            -13092766, -13158303, -13092767, -13027489, -13092766, -13092510, -13092766, -13158303, -13092767, -13027489,
            -13027489, -13027489, -13027489, -13027490, -13027749, -13027496, -13027489, -13027489, -13027489, -13027490,
            -13027749, -13027496, -12961961, -12962219, -12896682, -12830381, -12961961, -12962219, -12896682, -12830381};

    static final int[] centers_hdpi = new int[]{
            -13948087, -13948087, -13948087, -13947830, -13816755, -13816755, -13750960, -13684910, -13618603, -13553065,
            -13487014, -13420964, -13420964, -13420706, -13354656, -13158303, -13223582, -13157789, -13026973, -13092509,
            -13092509, -13026973, -13158302, -13092766, -13026973, -13026973, -13026973, -13026973, -13158303, -13158303,
            -13092510, -13026973, -13158303, -13026973, -13092766, -13092510, -13092766, -13158303, -13092767, -13027489,
            -13027489, -13027489, -13027489, -13027490, -13027749, -13027496, -12961961, -12962219, -12896682, -12830381};

    public static int SCREEN_DPI = Constants.XHDPI;

    public static int getShapeMinWidth() {
        if (SCREEN_DPI > Constants.XXHDPI) {
            return 200;
        } else if (SCREEN_DPI > Constants.XHDPI) {
            return 150;
        } else {
            return 100;
        }
    }

    public static int[] getCenterArrays() {
        if (SCREEN_DPI > Constants.XXHDPI) {
            return centers_xxhdpi;
        } else if (SCREEN_DPI > Constants.XHDPI) {
            return centers_xhdpi;
        } else {
            return centers_hdpi;
        }
    }

    public static int getBabyWidth() {
        if (SCREEN_DPI > Constants.XXHDPI) {
            return 100;
        } else if (SCREEN_DPI > Constants.XHDPI) {
            return 75;
        } else {
            return 50;
        }
    }

    public static int getMaxShapeHeight() {
        if (SCREEN_DPI > Constants.XXHDPI) {
            return 345;
        } else if (SCREEN_DPI > Constants.XHDPI) {
            return 230;
        } else {
            return 173;
        }
    }

    public static int getMinShapeHeight() {
        if (SCREEN_DPI > Constants.XXHDPI) {
            return 52;
        } else if (SCREEN_DPI > Constants.XHDPI) {
            return 40;
        } else {
            return 26;
        }
    }

    public static int getMinWhiteHeight(){
        if (SCREEN_DPI > Constants.XXHDPI) {
            return 24;
        } else if (SCREEN_DPI > Constants.XHDPI) {
            return 18;
        } else {
            return 12;
        }
    }
}
